package com.firemoss.atonement.entitymanager
{
	import flash.utils.Dictionary;

	public class WeaklyReferencedEntityContainer implements IEntityContainer
	{
		private var wrapper : Dictionary = new Dictionary( true )
			
		public function WeaklyReferencedEntityContainer()
		{
			
		}
		
		public function set entity(entity:Object):void
		{
			wrapper[ entity ] = true
		}
		
		public function get entity():Object
		{
			for ( var key : * in wrapper )
			{
				return key
			}
			
			return null;
		}
		
		public function get empty():Boolean
		{
			return ( entity == null )
		}
	}
}